home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / misc / ImageFXDevKit.lha / sdev / include / scan / errors.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-25  |  3.4 KB  |  103 lines

  1. /*
  2.  * Scan 'C' Header File
  3.  * Written by Thomas Krehbiel
  4.  *
  5.  * Standard error codes.
  6.  *
  7.  */
  8.  
  9. enum ERR_Tag {
  10.    ERR_Error = 512,        /* Some kinda error */
  11.    ERR_ChipMem,            /* Out of chip memory */
  12.    ERR_Memory,             /* Out of public memory */
  13.    ERR_Open,               /* Cannot open file */
  14.    ERR_Screen,             /* Cannot open screen */
  15.    ERR_Window,             /* Cannot open window */
  16.  
  17.    /* Library Errors: */
  18.    ERR_NoIntuit,           /* Cannot open Intuition.library */
  19.    ERR_NoGfx,              /* Cannot open Gfx.library */
  20.    ERR_NoHame,             /* Cannot open Hame.library */
  21.    ERR_NoArp,              /* Cannot open Arp.library */
  22.  
  23.    /* IFF Errors */
  24.    ERR_NotIFF,             /* Not on IFF File */
  25.    ERR_BadIFF,             /* IFF is mangled */
  26.  
  27.    /* ILBM Errors */
  28.    ERR_NotILBM,            /* IFF is not an ILBM */
  29.    ERR_Depth0,             /* Image depth is 0 */
  30.    ERR_Depth6,             /* Image depth > 6 */
  31.    ERR_Depth24,            /* Image depth not 24-bit */
  32.  
  33.    /* Misc Errors */
  34.    ERR_NoHEInit,           /* HAME_Init() failed */
  35.    ERR_DiffBM,             /* Bitmaps are different */
  36.  
  37.    ERR_LastError,          /* User errors begin here */
  38.  
  39.    /*
  40.     * Basically just indicators.
  41.     */
  42.    ERR_UserCancel = 2001,     /* user cancelled operation */
  43.    ERR_AtBoundary,            /* at buffer boundary */
  44.    ERR_NOP,                   /* nothing to do */
  45.    ERR_UserHalt,              /* user halted macro */
  46.    ERR_dummy02,
  47.    ERR_dummy03,
  48.    ERR_dummy04,
  49.    ERR_dummy05,
  50.    ERR_dummy06,
  51.  
  52.    /*
  53.     * Arexx- and command processing-specific errors.
  54.     */
  55.    ERR_BadCommand,            /* unknown command */
  56.    ERR_BadArgs,               /* invalid arguments */
  57.    ERR_dummy10,
  58.    ERR_dummy11,
  59.    ERR_dummy12,
  60.    ERR_dummy13,
  61.    ERR_dummy14,
  62.    ERR_dummy15,
  63.    ERR_dummy16,
  64.    ERR_dummy17,
  65.    ERR_dummy18,
  66.    ERR_dummy19,
  67.  
  68.    /*
  69.     * Other error codes.
  70.     */
  71.    ERR_NoSerial,              /* cannot open serial device */
  72.    ERR_NoBuffer,              /* no image buffer to work on */
  73.    ERR_MustBeColor,           /* image must be color */
  74.    ERR_MustBeGrey,            /* image must be grey */
  75.    ERR_NotOnDisk,             /* cannot process disk buffer */
  76.    ERR_BadFileType,           /* unknown file type */
  77.    ERR_NoPalette,             /* no palette in file */
  78.    ERR_NotOnRegion,           /* cannot be done to region */
  79.    ERR_ClipEmpty,             /* clipboard empty */
  80.    ERR_NoImage,               /* no image in file */
  81.    ERR_NeedAlpha,             /* need an alpha channel */
  82.    ERR_NeedBrush,             /* need a brush to work with */
  83.    ERR_NeedRegion,            /* need a region defined */
  84.    ERR_NoIffParse,            /* iffparse.library not found */
  85.    ERR_ModOpenFail,           /* module open failed */
  86.    ERR_VmemDisabled,          /* virtual memory disabled */
  87.    ERR_VmemFull,              /* virtual memory device full */
  88.    ERR_MaxBufSize,            /* max buf size is 32768x32768 */
  89.    ERR_Write,                 /* write error */
  90.    ERR_Read,                  /* read error */
  91.    ERR_BadDepth,              /* bad image depth */
  92.    ERR_UnknownForm,           /* unknown form of image file */
  93.    ERR_HookFailed,            /* hook program failed */
  94.    ERR_NotOnBrush,            /* cannot perform op on brush */
  95.    ERR_NotOnExternal,         /* cannot perform on external image */
  96.  
  97.    ERR_MaxError
  98. };
  99.  
  100. #define ReturnError(x,v)   { SetError((x)); return ((v)); }
  101. #define GotoError(x,L)     { SetError((x)); goto L; }
  102.  
  103.